package com.dnjn.happiness.biz.api;

import com.dnjn.happiness.biz.api.factory.RemoteEmotionTypeFallbackFactory;
import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import com.dnjn.happiness.common.core.model.EmotionTypeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteEmotionTypeService",value = ServiceNameConstants.BIZ_SERVICE,fallbackFactory = RemoteEmotionTypeFallbackFactory.class)
public interface RemoteEmotionTypeService {

    @GetMapping("/emotionType/getByCode/{code}")
    public R<EmotionTypeVO> getByCode(@PathVariable("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
